<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String hrefFlag = request.getParameter("hrefFlag");
hrefFlag = hrefFlag == null ? "" : hrefFlag;
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=8">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta content="B2B电商平台" name="description"/>
	<meta content="B2B电商平台" name="keyword"/>
	<link rel="icon" href="include/images/icss.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="include/images/icss.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="<%=path %>/include/css/global.css" />
  <script type="text/javascript" src="<%=path %>/include/js/jquery-1.8.0.min.js"></script>
  <script type="text/javascript" src="<%=path %>/include/js/icss.common.js"></script>
  <style type="text/css">
  body{margin-left: auto; margin-right: auto;}
  </style>
  <head>
    <title></title>
  </head>
  <body class="grayBg" id="corcenter_newl">
    <div class="mmt_top" style="display:none;"><!--mmt_top S-->
	<div class="mmtTop_bbc">
		<!-- 
		<div class="mmtTop_user">您好！<span id="userName"></span><span>[<a href="<%=path %>/login/login_out.do" target="_self">退出</a>]</span></div>
		 -->
		<span class="topTel" style="display:none;">400-6360-888</span>
		<div class="mmtTopSele" style="display:none;">
        	<ul>
        		<li>|</li>
                <li class="Topitem_nav Hcservise">
                    <a href="<%=path %>/pages/login/mainContent.jsp" class="itemR-icon" rel="nofollow" target="_blank" onmousedown="return hcclick('?hcjsy_homepage=hcmy_homepagelog_top_hcfw')">解放服务
                        <s></s>
                    </a>
                </li>
            </ul>
        </div>
		<div class="mmtTop_lik" style="z-index:2;display:none;">
			<a href="http://www.hc360.com/" target="_blank" onmousedown="return hcclick('?hcmy_homepagelog=hcwsy')">解放购首页</a>  | 
			<a href="#" id="a1" onClick="entersHuiBaoPay(true)" title="点此进入我的慧付宝" onmousedown="return hcclick('?hcmy_homepagelog=hfb')">我的慧付宝</a> | 
			<span id="remindMsgId"><a href="javascript:openMsg('0');" hideFocus='true' class="gbb" onmousedown="return hcclick('?hcmy_homepagelog=xxtx')">消息<em> 5 </em></a>  |</span>
			<a href="http://sxy.hc360.com" target="_blank" onMouseDown="return hcclick('?hcmy_homepagelog=xthelp')">商学院</a>  |
			<a href="http://help.hc360.com" target="_blank" onMouseDown="return hcclick('?hcmy_homepagelog=help')">客服中心</a>
		</div>
		<div id="topremind" class="call_home_top_tags tags1_zss ui-dialog-content ui-widget-content" style="display:none; width: auto; min-height: 0px; height: 319px;"  title="消息"></div>
		<div id="huibaopay" class="call_home_top_tags tags1_zss ui-dialog-content ui-widget-content" style="display:none; width: auto; min-height: 0px; height: 200px;" align="center"  title="消息提醒"></div>
	</div>
	</div><!--mmt_top E-->
	
	<input type="hidden" id="autoOpenMsg" value="" />

	<div class="NewHead">
		<div class="NewNavBox">
			<div class="NewLogo">
				<img src="<%=path %>/include/images/logo/logo.png" style="width:180px;height:50px;padding-left:10px;padding-top:5px;height:40px;"/>
			</div>
			<div class="NewNavList" id="NewNavList" >
	        	<ul>
	            	<li class="tagLi" id="mainHome" class="NewCur"><em><a href="<%=path %>/pages/login/mainHome.jsp" target="_self" >首页</a></em></li>
	            </ul>
	        </div>
	        <div style="float:right;height:60px;line-height:60px;text-align:right;padding-right:20px;color:white;">
	        	您好！<span id="userName"></span><span><a href="<%=path %>/login/login_out.do" target="_self">[退出]</a></span>
	        </div>
		</div>
	</div>
	<jsp:include page="../../login/mainHome.jsp"  >
  		<jsp:param name="hrefFlag" value="mainHome" />
  	</jsp:include>
  </body>
  <script type="text/javascript">
  var path =  "<%=path%>";
  var hrefFlag = "<%=hrefFlag%>";
  $(document).ready(function(){
		_queryMenuList();
	_getUserInfo();
  });
  function _setLiClass(hrefFlag){
  	if(hrefFlag==""){
  		hrefFlag = "mainHome";
  	}
  	$(".NewNavList .tagLi").each(function(){
      	if($(this).attr("id")==hrefFlag){
    	  	$(this).addClass("NewCur");
      	} else {
      		$(this).removeClass("NewCur"); 
      	}
      });
  }
  function _getUserInfo(){
  	$.ajax({
		type:"post",
		url: path+"/login/getUserInfo.do",
		dataType:"json",
		success:function(data){
			if(data.success){
				$("#userName").html(data.obj.userName);
			}
		}
	});
  }
  function _queryMenuList(){
  	 $.ajax({
		type:"post",
		url: path+"/menuRight/queryMenuList.do",
		data:{menuType : 'menuHead'},
		dataType:"json",
		success:function(data){
			if(data.success){
				var str = "";
				if(data.obj.length>0){
					var list = data.obj;
					str +="<ul>";
					for(var i=0;i<list.length;i++){
						str +="<li class='tagLi' id='"+list[i].MENU_ID+"' class='NewCur'><em><a href='javascript:void()' onclick=\"_gotoPages('"+list[i].RESOURCE_URL+"','"+list[i].MENU_ID+"')\" target='_self' >"+list[i].RESOURCE_NAME+"</a></em></li>";
					}
					str +="</ul>";
				}
				console.info(str);
				$("#NewNavList").html(str);
				_setLiClass(hrefFlag);
			}
		}
	});
  }
  function _gotoPages(menuUrl,menuId){
  	var url = menuUrl;
  	if(url.indexOf("?")>0){
  		url = url+"&menuId="+menuId;
  	} else {
  		url = url+"?menuId="+menuId;
  	}
  	window.location.href = url;
  }
  </script>
</html>